package com.abner.design.patterns.composite;

/**
 * 这是组合中对象声明接口，在适当情况下，实现所有类共有的接口默认行为,
 * 用于访问和管理Component 子部件, Component 可以是抽象类或者接口
 * @author abner
 */
public abstract class OrganizationComponent {

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 描述
	 */
	private String des;

	/**
	 * 打印
	 */
	protected abstract void print();

	/**
	 * 添加
	 * @param organizationComponent
	 */
	protected void add(OrganizationComponent organizationComponent) {
		throw new UnsupportedOperationException();
	}

	/**
	 * 删除
	 * @param organizationComponent
	 */
	protected  void remove(OrganizationComponent organizationComponent) {
		throw new UnsupportedOperationException();
	}

	public OrganizationComponent(String name, String des) {
		super();
		this.name = name;
		this.des = des;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDes() {
		return des;
	}

	public void setDes(String des) {
		this.des = des;
	}

}
